#include <wx/wx.h>

class ScrWindow : public wxFrame
{
public:
    ScrWindow(const wxString &title);
};

ScrWindow::ScrWindow(const wxString &title)
    : wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, wxSize(300, 200))
{
    wxImage::AddHandler(new wxJPEGHandler);
    wxScrolledWindow *sw = new wxScrolledWindow(this);

    wxBitmap bmp(wxT("../../../../resourses/test.jpg"), wxBITMAP_TYPE_JPEG);
    wxStaticBitmap *sb = new wxStaticBitmap(sw, -1, bmp);

    int width = bmp.GetWidth();
    int height = bmp.GetHeight();

    sw->SetScrollbars(10, 10, width / 10, height / 10);
    sw->Scroll(50, 10);

    Center();
}

class MyApp : public wxApp
{
public:
    virtual bool OnInit();
};

bool MyApp::OnInit()
{
    ScrWindow *win = new ScrWindow(wxT("ScrolledWindow"));
    win->Show(true);
    return true;
}

wxIMPLEMENT_APP(MyApp);